package com.jblog.core.dao.blog.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.jblog.Constants;
import com.jblog.core.dao.base.EntityDao4Mybatis;
import com.jblog.core.dao.blog.CategoryDao;
import com.jblog.core.model.blog.Category;
import com.jblog.core.model.blog.param.CategoryParam;

@Repository
@SuppressWarnings("unchecked")
public class CategoryDaoImpl extends EntityDao4Mybatis<Category, Long> implements CategoryDao {

    @Override
    public List<Category> getAll(CategoryParam p) {
        return (List<Category>)super.getSqlSession().selectList(
                getNamespace() + Constants.MyBatis.GET_ALL, p);
    }

}